#include<iostream>
using namespace std;
#include<vector>

int main()
{
	vector<int> vec = { 1, 2, 3,4 };
	vec.push_back(5);

	for (int i = 0; i < vec.size(); i++)
	{
		cout << vec[i] << " ";
	}
	cout << endl;
	cout << vec.size() << endl;
	cout << vec.capacity() << endl;

	vec.insert(--vec.end(), 6);
	for (int i = 0; i < vec.size(); i++)
	{
		cout << vec[i] << " ";
	}
	return 0;
}